<template>
	<view>
		<navbar type='3' title='转账'></navbar>
		<view class="label">
			<view class="label_text">转账方式</view>
			<view class="textinput flex-between" @click="overlayshow=true">
				<span class="phone" >{{line?line:'选择转账方式'}}</span>
				<!-- <input v-else type="text" v-model="line" disabled="disabled" @input='inputChange' placeholder-class="phone" /> -->
				<view class="flex" style="align-items: center;">
					<image class="img2" src="../../static/wallet/down.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="label">
			<view class="label_text">手机号</view>
			<view class="textinput flex-between">
				<input type="number" v-model="mobile" maxlength="11" @input='inputChange' placeholder="请输入手机号" placeholder-class="phone" />
			</view>
		</view>
		
		<overlay :overlayshow='overlayshow' :type='type' @btnsel='isbtnsel' @close='overlayshow=false'></overlay>
		<view class="label">
			<view class="label_text">转账金额</view>
			<view class="textinput flex-between">
				<input type="digit" v-model="money" @input='inputChange' placeholder="最少 0" placeholder-class="phone" />
				<view class="flex" style="align-items: center;">
					<view class="text1">TOPS</view>
					<image class="img1" src="../../static/wallet/line.png" mode=""></image>
					<view class="text2">全部</view>
				</view>
			</view>
		</view>
		<view class="allmoney">总余额：123456789.12</view>
		<view class="textbot flex-between">
			<view class="">网络费用</view>
			<view class="">-TOPS</view>
		</view>
		<view class="textbot flex-between">
			<view class="">到账数量</view>
			<view class="">-TOPS</view>
		</view>
		<view :class="logining?'isbtn istext':'istext'" @click="logining?topay():''">
			提交
		</view>
		<u-overlay :show="showpaw" >
			<view class="showpaw">
				<view class="text">输入交易密码</view>
				<u-code-input v-model="payvalue" size='32' fontSize='14' color='#333333' space='5' :maxlength="6"></u-code-input>
				<view class="btn flex-between">
					<view class="btn_close" @click="showpaw=false">取消</view>
					<view class="btn_sure">确定</view>
				</view>
			</view>
		</u-overlay>
	</view>
</template>

<script>
	import navbar from "@/components/navbar.vue"
	import overlay from "./overlay.vue"
	export default {
		components:{
			navbar,overlay
		},
		data() {
			return {
				logining:false,
				mobile:'',
				line:'1',
				money:'',
				overlayshow:false,
				showpaw:false,
				payvalue:'',
				type:3
			}
		},
		methods: {
			inputChange(){
				const {mobile,line,money}=this
				if(mobile!==''&&line!==''&&money!==''){
					this.logining=true
				}else{
					this.logining=false
				}
			},
			topay(){
				this.showpaw=true
			},
			isbtnsel(res){
				this.line=res
				this.overlayshow=false
			}
		}
	}
</script>

<style lang="scss">
	.right{
		image{
			width: 38rpx;
			height: 42rpx;
		}
	}
	.label{
		width: 690rpx;
		box-sizing: border-box;
		margin: 0 auto 0;
		padding-top: 30rpx;
		&_text{
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #333333;
			line-height: 28rpx;
			text-align: left;
			font-style: normal;
		}
		.textinput{
			width: 690rpx;
			height: 80rpx;
			background: #FFFFFF;
			border-radius: 24rpx;
			padding: 0 20rpx;
			box-sizing: border-box;
			margin-top: 20rpx;
			margin-bottom: 30rpx;
			align-items: center;
			.text1{
				font-weight: 400;
				font-size: 28rpx;
				color: #333333;
			}
			.text2{
				font-weight: 500;
				font-size: 28rpx;
				color: #9999FF;
			}
		}
		.img1{
			width: 2rpx;
			height: 40rpx;
			margin: 0 20rpx;
		}
		.img2{
			width: 28rpx;
			height: 28rpx;
		}
		.istipcol{
			color: #999999;
		}
		.phone,.password{
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #CCCCCC;
			text-align: left;
			font-style: normal;
		}
	}
	.allmoney{
		font-weight: 400;
		font-size: 24rpx;
		color: #999999;
		padding: 0rpx 0 32rpx 30rpx;
		border-bottom: 1rpx solid #d8d8d8;
	}
	.textbot{
		width: 750rpx;
		height: 100rpx;
		font-weight: 400;
		font-size: 28rpx;
		color: #333333;
		align-items: center;
		box-sizing: border-box;
		padding: 0 30rpx;
	}
	.istext{
		width: 690rpx;
		height: 88rpx;
		background: #EAEAEA;
		border-radius: 44rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #CCCCCC;
		line-height: 96rpx;
		text-align: left;
		font-style: normal;
		text-align: center;
		margin: 90rpx auto 0;
	}
	.isbtn{
		background: #9999FF;
		color: #FFFFFF;
	}
	
	.showpaw{
		width: 500rpx;
		height: 316rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		position: fixed;
		top: 30%;
		left: 125rpx;
		box-sizing: border-box;
		padding: 40rpx 30rpx;
		.text{
			font-weight: 500;
			font-size: 30rpx;
			color: #333333;
			text-align: center;
			margin-bottom: 30rpx;
		}
		.btn{
			margin-top: 40rpx;
			&_close{
				width: 186rpx;
				height: 72rpx;
				border-radius: 40rpx;
				border: 2rpx solid #9999FF;
				font-weight: 500;
				font-size: 26rpx;
				color: #9999FF;
				line-height: 72rpx;
				text-align: center;
			}
			&_sure{
				width: 186rpx;
				height: 72rpx;
				background: #9999FF;
				border-radius: 40rpx;
				font-weight: 500;
				font-size: 26rpx;
				color: #FFFFFF;
				line-height: 72rpx;
				text-align: center;
			}
		}
	}
</style>
